Create Gateway
Gateways
Create Gateway
Register a new gateway and provision its main agent
POST
Create Gateway
Creates a new gateway configuration in Mission Control and provisions or refreshes the gateway’s main agent.
Then restart the gateway:
Authentication
Requires organization admin authentication viaAuthorization: Bearer <token> header.
Request Body
Human-readable gateway name (e.g., “Production Gateway”)
WebSocket URL of the gateway (e.g.,
ws://gateway-host:18789 or wss://gateway.example.com)Root directory for agent workspaces on the gateway hostExample:
/home/ubuntu/.openclaw/workspacesAuthentication token for gateway RPC (optional for gateways without authentication)
Skip TLS certificate validation (use only for development)
Disable device pairing and use
control_ui modeImportant: When true, the gateway must have dangerouslyDisableDeviceAuth: true in its configResponse
Returns aGatewayRead object with the same structure as List Gateways.
Gateway Creation Workflow
When you create a gateway, Mission Control:- Validates the gateway URL is reachable
- Checks gateway runtime version meets minimum requirements (
GATEWAY_MIN_VERSION) - Creates gateway record in database
- Provisions or updates the gateway main agent
- Returns the gateway configuration
Gateway Main Agent
Every gateway has a main agent that:- Has
is_gateway_main=trueandboard_id=null - Acts as the gateway’s primary orchestrator
- Can access multiple boards when permitted
- Is automatically created/updated during gateway operations
Example Request
Example Response
Gateway Configuration Requirements
OpenClaw Configuration
Before creating a gateway withdisable_device_pairing=true, ensure the gateway has this configuration in ~/.openclaw/openclaw.json:
Network Connectivity
Ensure the gateway is reachable from Mission Control:Error Responses
400 Bad Request
Invalid URL format or missing required fields
403 Forbidden
Insufficient permissions (not organization admin)
422 Unprocessable Entity
Validation failed (e.g., workspace_root is empty)
502 Bad Gateway
Gateway is unreachable or authentication failed
Gateway version is below minimum required version
Post-Creation Steps
After creating a gateway:- Verify Connectivity: Check gateway status via Gateway Status
- Sync Templates: Run Template Sync to configure agents
- Create Board Agents: Provision agents for your boards
- Test Agent Communication: Verify agents can authenticate and make API calls
Troubleshooting
”Gateway is unreachable”
- Check gateway URL is correct
- Verify gateway is running:
ps aux | grep openclaw - Test network connectivity:
nc -zv gateway-host 18789
”Missing scope: operator.read”
- Ensure
dangerouslyDisableDeviceAuth: truein gateway config - Restart gateway after config changes
- Verify
disable_device_pairing: truein gateway record
”Gateway version too old”
- Upgrade gateway to version ≥
GATEWAY_MIN_VERSION(default: 2026.02.9) - Check version:
openclaw --version